package com.wenlong.dao.impl;

import com.wenlong.dao.BashDao;
import com.wenlong.dao.OrderItemDao;
import com.wenlong.pojo.OrderItem;

/**
 * @author 苏文龙
 * @version 1.0
 */
public class OrderItemDaoImpl extends BashDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql = "insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) " +
                "values(?,?,?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
